﻿using mscook.core.domain;
using mscook.core.repositories;
using mscook.core.utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mscook.core.services
{
    public class ResourceBonusSettingService : IResourceBonusSettingService
    {
        private IResourceBonusSettingRepository iResourceBonusSettingRepository;
        //private ILogger iLogger;

        public ResourceBonusSettingService(IResourceBonusSettingRepository iResourceBonusSettingRepository)
        {
            this.iResourceBonusSettingRepository = iResourceBonusSettingRepository;
            //this.iLogger = iLogger;
        }
        public IList<ResourceBonusSetting> SelectAll()
        {
            return iResourceBonusSettingRepository.GetAll();
        }

        public void SaveOrUpdate(ResourceBonusSetting resourceBonusSetting)
        {
            iResourceBonusSettingRepository.SaveOrUpdate(resourceBonusSetting);
        }

        public void Delete(string id)
        {
            iResourceBonusSettingRepository.Delete(id);
        }

        public ResourceBonusSetting SelectByResourceId(string resourceId)
        {
            return iResourceBonusSettingRepository.SelectByResourceId(resourceId);
        }

        public IList<ResourceBonusSetting> SelectByAriticKey(string year, string month)
        {
            return iResourceBonusSettingRepository.SelectByAriticKey(year,month);
        }

        public IList<ResourceBonusSetting> SelectByAriticKeyAndType(string year, string month, PurchasedCategory purchasedCategory)
        {
            return iResourceBonusSettingRepository.SelectByAriticKeyAndType(year,month,purchasedCategory);
        }
    }
}
